{{template "header"}}

<title>分类-beego 博客</title>
</head>

<body>

<div class="navbar navbar-default navbar-fixed-top">
    <div class="container">
    {{template "navbar" .}}
    </div>

</div>

<div style="height: 50px"></div>

<div class="container">
    <div class="page-header">
        <h1>文章列表</h1>
        <a href="/topic/add" class="btn btn-default">添加文章</a>
        <table class="table table-striped">
            <thead>
               <tr>
                   <th>#</th>
                   <th>文章名称</th>
                   <th>最后更新</th>
                   <th>浏览</th>
                   <th>回复数</th>
                   <th>回复时间</th>
                   <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作</th>
               </tr>
            </thead>
            <tbody>
            {{range .Topice}}
                <tr>
                    <th>{{.Id}}</th>
                    <th>{{.Title}}</th>
                    <th>{{.Updated}}</th>
                    <th>{{.Views}}</th>
                    <th>{{.ReplyCount}}</th>
                    <th>{{.ReplyTime}}</th>
                    <th><a class="btn btn-default btn-xs" href="/topic/delete/{{.Id}}">删除</a>&nbsp;&nbsp;
                        <a class="btn btn-default btn-xs" href="/topic/view/{{.Id}}">查看内容</a>
                    </th>
                </tr>
                    {{end}}
            </tbody>
        </table>

        </table>
    </div>
</div>


<script type="text/javascript" src="http://cdn.staticfile.org/jquery/3.2.1/jquery.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>

</body>
</html>